Skip to content

fix: keep workspace fonts, scope agent window commands, fix Windows restore and launch - #27

Merged
nodemode-ai merged 7 commits into
mainfrom
fix/review-2026-11-28
Nov 29, 2026
Merged

nodemode-ai merged 7 commits into
mainfrom
fix/review-2026-11-28

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep uploaded workspace fonts during file housekeeping: the sweep now treats a file listed in a workspace's fonts as in use.
  • Limit window commands run for an API token or MCP grant to the workspaces that credential may reach. The window refuses a command when the workspace it shows is not in the list. The server checks the workspace the window reports with each result and refuses the result when that workspace is outside the list.
  • Keep account, admin, terminal and new workspace window commands to the signed-in person. They are left out of the catalogue and refused for other credentials.
  • Apply the credential's workspaces and the workspace agent setting to emergency access entries in the workspace list. Leave those entries out of the workspaces sent with agent window commands.
  • Restore in place on Windows while the data folder is locked, because Windows will not rename a folder that holds an open file.
  • On Windows, start .cmd script shims through their node script or program target instead of cmd.exe. When a shim cannot be resolved, refuse text that cmd.exe would read as commands before starting it.
  • Tests: workspace fonts kept by the sweep, window command scope and result checks, window-only commands, emergency access limits, in-place restore, and Windows shim resolution with the cmd.exe fallback checks.
  • Windows: when a script shim cannot be resolved and cmd.exe is used, any argument with a control character or & | < > ^ ( ) ! % " is now refused, with or without spaces. The message points to stdin or a file for long text.
  • Tests cover the resolved-shim path (direct argv, no character check), the strict cmd.exe fallback, the check on the program path, and the fixed launch words passing the check.

Tests

  • Each fix has a test that fails on the previous code where practical.
  • The repo CI commands were run locally on macOS. Every failure seen locally also fails on main in the same environment (missing local tools or platform-specific tests); none is introduced here.
  • Please rely on this PR's CI run for Linux and Windows.

For the owner

  • A few related items need an owner decision; they are listed separately, not here.

How to ship

  • Independent of other repos; merge in any order. No version bump; release as usual.

The housekeeping sweep now treats a file listed in a workspace's fonts
as in use, so uploaded fonts are no longer removed a day after upload.
Window commands run for an API token or MCP grant now carry the
workspaces that credential may reach, after workspace agent access is
applied. The window refuses the command when the workspace it shows is
not in that list, and the server refuses it when the list is empty.
Windows will not rename a folder that holds an open file, and restore
keeps its lock file open inside the data folder. Restore now swaps the
folder's contents in place there, as it already does for mount points.
The workspace list now applies the credential's workspaces and the
workspace agent setting to emergency access entries as well. The
workspaces sent with a window command also leave out emergency access
entries for any credential other than a normal sign-in.
The window now reports the workspace it shows with each command result,
and the server refuses the result for an API token or MCP grant when
that workspace is outside the credential's list. Account, admin,
terminal and new workspace commands are kept to the signed-in person:
they are left out of the catalogue and refused for other credentials.
A .cmd shim that points at a script or program is now resolved to that
target and run directly with node or the program itself. When it cannot
be resolved, words with control characters, percent signs or double
quotes, and words without spaces that hold cmd.exe operators, are
refused before cmd.exe is started.
When a script shim cannot be resolved to the program it wraps and cmd.exe
is still used, any word holding a control character or one of
& | < > ^ ( ) ! % " is refused, with or without spaces, since quoting
does not keep cmd.exe from reading them. The message points at stdin or
a file for long text. Tests cover the resolved and fallback paths and
check that the fixed launch words still pass.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:17
@nodemode-ai
nodemode-ai merged commit 076bc36 into main Nov 29, 2026
3 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants